Mopidy

Install

Add the repository in the system:

sudo wget -q -O /etc/apt/sources.list.d/mopidy.list http://apt.mopidy.com/mopidy.list

might be outdated, check https://www.mopidy.com/ for up to date information

Install mopidy:

sudo apt-get install mopidy

Configure

Several configuration files for Mopidy can be found on the system. Depending on how Mopidy is run, one configuration file would be used but instead of another one.

If mopidy is run as a service, the configuration should be done in /etc/mopidy/mopidy.conf

To edit the file, execute:

sudo vim /etc/mopidy/mopidy.conf

Add an entry to configure the mdp server:

[mpd]
enabled = true
hostname = ::
port = 6601
#password = bla
max_connections = 10
#connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
  • By default the server would only run locally on the machine. To expose it on the network the line hostname = :: is necessary.
  • It is also possible to configure a password to restrict access to the server. Note that here the password entry is preceded by a # which means that it will be ignored.

And add the media_dir :

[local]
data_dir = /var/lib/mopidy/local
media_dir = /media/music
  • With this configuration the media_dir is set to be/media/music.
  • The media_dir is the directory where the mpd server is gonna look for audio files.

Run

One the configuration is done, it is time to build the media library. To do so, let mopidy scan the audio files:

sudo service mopidy run local scan
  • let this run until the end.

Then run the server:

sudo service mopidy start
  • the server is now running in the background, exposing itself on the network.